﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="stockOrderList.aspx.cs" Inherits="WebSite.admin.warehouse.stockOrderList" %>
 
   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>福利点点通 </title>
            <style type="text/css">
        .x-grid3-row-table .expander
        {
            padding: 5px;
        }
        .x-grid3-row-table .expander p
        {
            padding: 5px 5px 5px 55px;
            text-align:left;
            
        }
         .x-grid3-row-table .expander table
        {
            margin-left:50px;
            
        }
          .x-grid3-row-table .expander .title
          {
               background-color:#E18325;
               line-height:22px;
              }
              .x-grid3-row-table .expander td
          {
              
               line-height:22px;
              }
         .x-grid3-row-table .expander th
         {    width:100px;
               font-weight:bold;
               text-align:center;
             }
         .x-grid3-row-table .expander .goods_name
         {    width:200px;
             }
       .x-grid3-row-table .expander .con_right
         {   
          text-align:right;
             }
        
        .x-grid3-row-table .expander table tbody
        {
            border-style:solid;
        }
        .new_order{ width:100%; background-color:Red;   padding:2px 0; text-align:center;}
         .new_inhousewareing{ width:100%; background-color:Yellow;  padding:2px 0; text-align:center; }
          .new_complate{ width:100%; background-color:Green;  padding:2px 0; text-align:center; }
      
    </style>

       <script language="javascript" type="text/javascript">

           function openModelWindow(orderCode,goodsId,stockPrice,modelTypeId) {

               X('Window1').box_show('/admin/warehouse/stockGoodsIn.aspx?code=' + orderCode + '&gid=' + goodsId + '&price=' + stockPrice + '&mid=' + modelTypeId, '采购商品入库');
           }
          
     </script>
   
</head>
<body>
    <form id="form1" runat="server">
       <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="订单列表"  ShowHeader="false" >
              <Items>
            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">
             <Items>
              <ext:Label ID="Label2"   runat="server" Text="货应商："></ext:Label>
               <ext:DropDownList id="ddlCompanyList" runat="server" Label="选择供应商"></ext:DropDownList>

                <ext:Label ID="lblOrderStates"   runat="server" Text="订单状态："></ext:Label>
                <ext:DropDownList ID="ddlOrderStates"  runat="server" Width="100px"  Text="订单状态" ShowLabel="true" Label="订单状态"> </ext:DropDownList>
                <ext:Label ID="lblPrice"  Width="100px"    runat="server" Text="&nbsp;&nbsp;到货时间从："></ext:Label>
                 <ext:DatePicker ID="txtDateFrom" runat="server"></ext:DatePicker>
                <ext:Label ID="Label1"  Width="30px"    runat="server" Text="到："></ext:Label>
              <ext:DatePicker ID="txtDateTo" runat="server"  ></ext:DatePicker>
                <ext:Label ID="lblKeywords"  Width="70px"  runat="server" Text="&nbsp;&nbsp;关键字："></ext:Label>
                <ext:TextBox runat="server" ID="txtKeywords"  Width="120px"  MaxLength="60" Label="关键字" ></ext:TextBox>
                <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server"  OnClick="btnSearch_Click"></ext:Button>
             </Items>
         </ext:Panel>
     </Items>   
   </ext:SimpleForm>
         <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  
           CssClass="x-form-item"  Height="400px"  AllowPaging="true" 
           SortColumn="stockOrderCode" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="False" 
           runat="server" EnableCheckBoxSelect="True"   AllowSorting="false"    IsDatabasePaging="false" 
                        DataKeyNames="id,stockOrderCode,stockStates" OnSort="Grid1_Sort" 
           EnableRowNumber="True" onrowdatabound="Grid1_RowDataBound" >
        <Columns>
             <ext:TemplateField RenderAsRowExpander="true">
                <ItemTemplate>
                    <div class="expander">
                       <div class="expander">
                            <p><b>联系人：</b><%# Eval("linker") %>&nbsp;&nbsp;&nbsp;&nbsp;<b>联系电话：</b><%# Eval("linkerPhone") %></p>  
                            <p><b>送货地址：</b><%# Eval("address")%></p>  
                         <table  cellpadding="0" cellspacing="0" border="1"   >
                            <tr class="title">
                               <th>商品编号</th>
                               <th class='goods_name'>商品名称</th>
                               <th>型号</th>
                               <th>进货价</th>
                               <th>进货数量</th>
                               <th>进货总价</th>
                               <th>已入库数量</th>
                               <th>采购入库</th>
                            </tr>
                            <%# Eval("goodsList") %>
                         </table>
                         <br />
                          
                    </div>
                    </div>
                </ItemTemplate>
            </ext:TemplateField>
          <ext:BoundField Width="140px" ColumnID="stockOrderCode" SortField="stockOrderCode" DataField="stockOrderCode" DataFormatString="{0}"
                HeaderText="订单编号" />
          <ext:BoundField Width="100px" ColumnID="statesName" SortField="statesName" DataField="statesName" DataFormatString="{0}"
                HeaderText="订单状态" />
          <ext:BoundField Width="160px" ColumnID="companyName" SortField="companyName" DataField="companyName" DataFormatString="{0}"
                HeaderText="供应商" />
          <ext:BoundField Width="140px" ColumnID="goodsToDate" SortField="goodsToDate" DataField="goodsToDate" DataFormatString="{0}"
                HeaderText="到货时间" />
          <ext:BoundField Width="140px" ColumnID="createTime" SortField="createTime" DataField="createTime" DataFormatString="{0}"
                HeaderText="下单时间" />
          <ext:BoundField Width="80px" ColumnID="sumOrderPrice" SortField="sumOrderPrice" DataField="sumOrderPrice" DataFormatString="{0}"
                HeaderText="订单总价" />
          <ext:BoundField Width="160px" ColumnID="remark" SortField="remark" DataField="remark" DataFormatString="{0}"
                HeaderText="备注" />
         <ext:WindowField Width="60px" WindowID="Window2" HeaderText="打印" Text="[打印]"   ToolTip="打印" DataIFrameUrlFields="id"
                                DataIFrameUrlFormatString="stockOrderPrinter.aspx?id={0}" Title="打印"
                                IFrameUrl="~/alert.aspx" />

        </Columns>
    </ext:Grid>

     <ext:Window ID="Window1" Title="弹出窗体" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="550px"
        EnableConfirmOnClose="true"  OnClose="Window1_Close"  Height="350px">
    </ext:Window>

       <ext:Window ID="Window2" Title="打印订单" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="750px"
        EnableConfirmOnClose="true"  Height="550px">
    </ext:Window>
    </form>
</body>
</html>
